package persentation.presentUniversityDean;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JPanel;

import businesslogic.teachPlanBl.TeachPlanController;

import java.awt.Font;
import java.awt.Graphics;
import java.awt.Image;

public class DepartmentInfoPanel extends JPanel {
	private static Image INFO = new ImageIcon("Graphics/universityDean/info.png").getImage();
	private MyTabbedPane tabbedPane;
	private YuanxijihuaPanel yuanxijihuaPanel;
	private YuanxijihuaPanel yuanxijihuaPanel1;
	private YuanxijihuaPanel yuanxijihuaPanel2;
	private YuanxijihuaPanel yuanxijihuaPanel3;
	private YuanxijihuaPanel yuanxijihuaPanel4;
	private YuanxijihuaPanel yuanxijihuaPanel5;
	private YuanxijihuaPanel yuanxijihuaPanel6;
	private YuanxijihuaPanel yuanxijihuaPanel7;
	private YuanxijihuaPanel yuanxijihuaPanel8;
	private YuanxijihuaPanel yuanxijihuaPanel9;
	private YuanxijihuaPanel yuanxijihuaPanel10;
	private YuanxijihuaPanel yuanxijihuaPanel11;
	private YuanxijihuaPanel yuanxijihuaPanel12;
	private YuanxijihuaPanel yuanxijihuaPanel13;
	private YuanxijihuaPanel yuanxijihuaPanel14;
	private YuanxijihuaPanel yuanxijihuaPanel15;
	private YuanxijihuaPanel yuanxijihuaPanel16;
	private YuanxijihuaPanel yuanxijihuaPanel17;
	private YuanxijihuaPanel yuanxijihuaPanel18;
	private YuanxijihuaPanel yuanxijihuaPanel19;
	private YuanxijihuaPanel yuanxijihuaPanel20;
	private YuanxijihuaPanel yuanxijihuaPanel21;
	private YuanxijihuaPanel yuanxijihuaPanel22;
	private YuanxijihuaPanel yuanxijihuaPanel23;
	private YuanxijihuaPanel yuanxijihuaPanel24;
	private YuanxijihuaPanel yuanxijihuaPanel25;
	private YuanxijihuaPanel yuanxijihuaPanel26;
	private YuanxijihuaPanel yuanxijihuaPanel27;

	private TeachPlanController teachPlanController;

	/**
	 * Create the panel.
	 */
	public DepartmentInfoPanel(TeachPlanController teachPlanController) {
		this.teachPlanController = teachPlanController;
		setLayout(null);

		yuanxijihuaPanel = new YuanxijihuaPanel(this.teachPlanController, "软件学院");
		yuanxijihuaPanel1 = new YuanxijihuaPanel(teachPlanController, "商学院经济学院");
		yuanxijihuaPanel2 = new YuanxijihuaPanel(teachPlanController, "商学院股学管理院");
		yuanxijihuaPanel3 = new YuanxijihuaPanel(teachPlanController, "法学院");
		yuanxijihuaPanel4 = new YuanxijihuaPanel(teachPlanController, "新闻传播学院");
		yuanxijihuaPanel5 = new YuanxijihuaPanel(teachPlanController, "现代工程与应用科学学院");
		yuanxijihuaPanel6 = new YuanxijihuaPanel(teachPlanController, "工程管理学院");
		yuanxijihuaPanel7 = new YuanxijihuaPanel(teachPlanController, "政府管理学院");
		yuanxijihuaPanel8 = new YuanxijihuaPanel(teachPlanController, "海外教育学院");
		yuanxijihuaPanel9 = new YuanxijihuaPanel(teachPlanController, "化学化工学院");
		yuanxijihuaPanel10 = new YuanxijihuaPanel(teachPlanController, "电子科学与工程系");
		yuanxijihuaPanel11 = new YuanxijihuaPanel(teachPlanController, "地球科学与工程学院");
		yuanxijihuaPanel12 = new YuanxijihuaPanel(teachPlanController, "生命科学学院");
		yuanxijihuaPanel13 = new YuanxijihuaPanel(teachPlanController, "信息管理系");
		yuanxijihuaPanel14 = new YuanxijihuaPanel(teachPlanController, "数学系");
		yuanxijihuaPanel15 = new YuanxijihuaPanel(teachPlanController, "天文与空间科学学院");
		yuanxijihuaPanel16 = new YuanxijihuaPanel(teachPlanController, "地理与海洋科学学院");
		yuanxijihuaPanel17 = new YuanxijihuaPanel(teachPlanController, "医学院");
		yuanxijihuaPanel18 = new YuanxijihuaPanel(teachPlanController, "建筑与城市规划学院");
		yuanxijihuaPanel19 = new YuanxijihuaPanel(teachPlanController, "历史学系");
		yuanxijihuaPanel20 = new YuanxijihuaPanel(teachPlanController, "外国语学院");
		yuanxijihuaPanel21 = new YuanxijihuaPanel(teachPlanController, "文学院");
		yuanxijihuaPanel22 = new YuanxijihuaPanel(teachPlanController, "社会学院");
		yuanxijihuaPanel23 = new YuanxijihuaPanel(teachPlanController, "物理学系");
		yuanxijihuaPanel24 = new YuanxijihuaPanel(teachPlanController, "计算机科学与技术系");
		yuanxijihuaPanel25 = new YuanxijihuaPanel(teachPlanController, "环境学院");
		yuanxijihuaPanel26 = new YuanxijihuaPanel(teachPlanController, "大气科学学院");
		yuanxijihuaPanel27 = new YuanxijihuaPanel(teachPlanController, "匡亚明学院");

		JButton button = new JButton("\u8F6F\u4EF6\u5B66\u9662");
		button.setFont(new Font("微软雅黑", Font.BOLD, 13));
		button.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				yuanxijihuaPanel.setMyTabbedPane(tabbedPane);
				tabbedPane.addOne("软件学院教学计划", yuanxijihuaPanel);
			}
		});
		button.setBounds(108, 75, 119, 40);
		add(button);

		JButton button_1 = new JButton(
				"\u5546\u5B66\u9662\u7ECF\u6D4E\u5B66\u9662");
		button_1.setFont(new Font("微软雅黑", Font.BOLD, 13));
		button_1.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				yuanxijihuaPanel1.setMyTabbedPane(tabbedPane);
				tabbedPane.addOne("商学院经济学院教学计划", yuanxijihuaPanel1);
			}
		});
		button_1.setBounds(108, 126, 119, 40);
		add(button_1);

		JButton button_2 = new JButton(
				"\u5546\u5B66\u9662\u7BA1\u7406\u5B66\u9662");
		button_2.setFont(new Font("微软雅黑", Font.BOLD, 13));
		button_2.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				yuanxijihuaPanel2.setMyTabbedPane(tabbedPane);
			 tabbedPane.addOne("商学院管理学院教学计划", yuanxijihuaPanel2);
			 
			}
		});
		button_2.setBounds(108, 177, 119, 40);
		add(button_2);

		JButton button_3 = new JButton("\u6CD5\u5B66\u9662");
		button_3.setFont(new Font("微软雅黑", Font.BOLD, 13));
		button_3.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				yuanxijihuaPanel2.setMyTabbedPane(tabbedPane);
				 tabbedPane.addOne("法学院教学计划", yuanxijihuaPanel3);
			}
		});
		button_3.setBounds(108, 228, 119, 40);
		add(button_3);

		JButton button_4 = new JButton("\u65B0\u95FB\u4F20\u64AD\u5B66\u9662");
		button_4.setFont(new Font("微软雅黑", Font.BOLD, 13));
		button_4.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				yuanxijihuaPanel4.setMyTabbedPane(tabbedPane);
				 tabbedPane.addOne("新闻传播学院教学计划", yuanxijihuaPanel4);
			}
		});
		button_4.setBounds(108, 279, 119, 40);
		add(button_4);

		JButton button_5 = new JButton(
				"\u73B0\u4EE3\u5DE5\u7A0B\u4E0E\u5E94\u7528\u79D1\u5B66\u5B66\u9662");
		button_5.setFont(new Font("微软雅黑", Font.BOLD, 13));
		button_5.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				yuanxijihuaPanel5.setMyTabbedPane(tabbedPane);
				tabbedPane.addOne("现代工程与应用科学学院教学计划", yuanxijihuaPanel7);
			}
		});
		button_5.setBounds(108, 330, 119, 40);
		add(button_5);

		JButton button_6 = new JButton("\u5DE5\u7A0B\u7BA1\u7406\u5B66\u9662");
		button_6.setFont(new Font("微软雅黑", Font.BOLD, 13));
		button_6.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				yuanxijihuaPanel6.setMyTabbedPane(tabbedPane);
				tabbedPane.addOne("工程管理学院教学计划", yuanxijihuaPanel7);
			}
		});
		button_6.setBounds(108, 381, 119, 40);
		add(button_6);

		JButton button_7 = new JButton("\u653F\u5E9C\u7BA1\u7406\u5B66\u9662");
		button_7.setFont(new Font("微软雅黑", Font.BOLD, 13));
		button_7.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				yuanxijihuaPanel7.setMyTabbedPane(tabbedPane);
				tabbedPane.addOne("政府管理学院教学计划", yuanxijihuaPanel7);
			}
		});
		button_7.setBounds(267, 75, 118, 40);
		add(button_7);

		JButton button_8 = new JButton("\u6D77\u5916\u6559\u80B2\u5B66\u9662");
		button_8.setFont(new Font("微软雅黑", Font.BOLD, 13));
		button_8.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				yuanxijihuaPanel8.setMyTabbedPane(tabbedPane);
				tabbedPane.addOne("海外教育学院教学计划", yuanxijihuaPanel8);
			}
		});
		button_8.setBounds(267, 126, 118, 40);
		add(button_8);

		JButton button_9 = new JButton("\u5316\u5B66\u5316\u5DE5\u5B66\u9662");
		button_9.setFont(new Font("微软雅黑", Font.BOLD, 13));
		button_9.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				yuanxijihuaPanel9.setMyTabbedPane(tabbedPane);
				tabbedPane.addOne("化学化工学院教学计划", yuanxijihuaPanel9);
			}
		});
		button_9.setBounds(267, 177, 118, 40);
		add(button_9);

		JButton button_10 = new JButton(
				"\u7535\u5B50\u79D1\u5B66\u4E0E\u5DE5\u7A0B\u7CFB");
		button_10.setFont(new Font("微软雅黑", Font.BOLD, 13));
		button_10.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				yuanxijihuaPanel10.setMyTabbedPane(tabbedPane);
				tabbedPane.addOne("电子科学与工程系教学计划", yuanxijihuaPanel10);
			}
		});
		button_10.setBounds(267, 228, 118, 40);
		add(button_10);

		JButton button_11 = new JButton(
				"地球科学与工程学院");
		button_11.setFont(new Font("微软雅黑", Font.BOLD, 13));
		button_11.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				yuanxijihuaPanel11.setMyTabbedPane(tabbedPane);
				tabbedPane.addOne("地球科学与工程学院教学计划", yuanxijihuaPanel11);
			}
		});
		button_11.setBounds(267, 279, 118, 40);
		add(button_11);

		JButton button_12 = new JButton("\u751F\u547D\u79D1\u5B66\u5B66\u9662");
		button_12.setFont(new Font("微软雅黑", Font.BOLD, 13));
		button_12.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				yuanxijihuaPanel12.setMyTabbedPane(tabbedPane);
				tabbedPane.addOne("生命科学学院教学计划", yuanxijihuaPanel12);
			}
		});
		button_12.setBounds(267, 330, 118, 40);
		add(button_12);

		JButton button_13 = new JButton("\u4FE1\u606F\u7BA1\u7406\u7CFB");
		button_13.setFont(new Font("微软雅黑", Font.BOLD, 13));
		button_13.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				yuanxijihuaPanel13.setMyTabbedPane(tabbedPane);
				tabbedPane.addOne("信息管理系教学计划", yuanxijihuaPanel13);
			}
		});
		button_13.setBounds(267, 381, 118, 40);
		add(button_13);

		JButton button_14 = new JButton("\u6570\u5B66\u7CFB");
		button_14.setFont(new Font("微软雅黑", Font.BOLD, 13));
		button_14.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				yuanxijihuaPanel14.setMyTabbedPane(tabbedPane);
				tabbedPane.addOne("数学系教学计划", yuanxijihuaPanel14);
			}
		});
		button_14.setBounds(430, 75, 118, 40);
		add(button_14);

		JButton button_15 = new JButton(
				"\u5929\u6587\u4E0E\u7A7A\u95F4\u79D1\u5B66\u5B66\u9662");
		button_15.setFont(new Font("微软雅黑", Font.BOLD, 13));
		button_15.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				yuanxijihuaPanel15.setMyTabbedPane(tabbedPane);
				tabbedPane.addOne("天文与空间科学学院教学计划", yuanxijihuaPanel15);
			}
		});
		button_15.setBounds(430, 126, 118, 40);
		add(button_15);

		JButton button_16 = new JButton(
				"\u5730\u7406\u4E0E\u6D77\u6D0B\u79D1\u5B66\u5B66\u9662");
		button_16.setFont(new Font("微软雅黑", Font.BOLD, 13));
		button_16.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				yuanxijihuaPanel16.setMyTabbedPane(tabbedPane);
				tabbedPane.addOne("地理与海洋科学学院教学计划", yuanxijihuaPanel16);
			}
		});
		button_16.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
			}
		});
		button_16.setBounds(430, 177, 118, 40);
		add(button_16);

		JButton button_17 = new JButton("\u533B\u5B66\u9662");
		button_17.setFont(new Font("微软雅黑", Font.BOLD, 13));
		button_17.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				yuanxijihuaPanel17.setMyTabbedPane(tabbedPane);
			    tabbedPane.addOne("医学学院教学计划", yuanxijihuaPanel17);
			}
		});
		button_17.setBounds(430, 228, 118, 40);
		add(button_17);

		JButton button_18 = new JButton(
				"\u5EFA\u7B51\u4E0E\u57CE\u5E02\u89C4\u5212\u5B66\u9662");
		button_18.setFont(new Font("微软雅黑", Font.BOLD, 13));
		button_18.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				yuanxijihuaPanel18.setMyTabbedPane(tabbedPane);
				tabbedPane.addOne("建筑与城市规划学院教学计划", yuanxijihuaPanel19);
			}
		});
		button_18.setBounds(430, 279, 118, 40);
		add(button_18);

		JButton button_19 = new JButton("\u5386\u53F2\u5B66\u7CFB");
		button_19.setFont(new Font("微软雅黑", Font.BOLD, 13));
		button_19.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				yuanxijihuaPanel19.setMyTabbedPane(tabbedPane);
				tabbedPane.addOne("历史学系教学计划", yuanxijihuaPanel19);
			}
		});
		button_19.setBounds(430, 330, 118, 40);
		add(button_19);

		JButton button_20 = new JButton("\u5916\u56FD\u8BED\u5B66\u9662");
		button_20.setFont(new Font("微软雅黑", Font.BOLD, 13));
		button_20.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				yuanxijihuaPanel20.setMyTabbedPane(tabbedPane);
				tabbedPane.addOne("外国语学院教学计划", yuanxijihuaPanel20);
			}
		});
		button_20.setBounds(430, 381, 118, 40);
		add(button_20);

		JButton button_21 = new JButton("文学院");
		button_21.setFont(new Font("微软雅黑", Font.BOLD, 13));
		button_21.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				yuanxijihuaPanel21.setMyTabbedPane(tabbedPane);
				 tabbedPane.addOne("文学院教学计划", yuanxijihuaPanel21);
			}
		});
		button_21.setBounds(588, 75, 115, 40);
		add(button_21);

		JButton button_22 = new JButton("\u793E\u4F1A\u5B66\u9662");
		button_22.setFont(new Font("微软雅黑", Font.BOLD, 13));
		button_22.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				yuanxijihuaPanel22.setMyTabbedPane(tabbedPane);
				tabbedPane.addOne("社会学院教学计划", yuanxijihuaPanel22);
			}
		});
		button_22.setBounds(588, 126, 115, 40);
		add(button_22);

		JButton button_23 = new JButton("\u7269\u7406\u5B66\u7CFB");
		button_23.setFont(new Font("微软雅黑", Font.BOLD, 13));
		button_23.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				yuanxijihuaPanel23.setMyTabbedPane(tabbedPane);
				tabbedPane.addOne("物理学系教学计划", yuanxijihuaPanel23);
			}
		});
		button_23.setBounds(588, 177, 115, 40);
		add(button_23);

		JButton button_24 = new JButton(
				"\u8BA1\u7B97\u673A\u79D1\u5B66\u4E0E\u6280\u672F\u7CFB");
		button_24.setFont(new Font("微软雅黑", Font.BOLD, 13));
		button_24.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				yuanxijihuaPanel24.setMyTabbedPane(tabbedPane);
				tabbedPane.addOne("计算机科学与技术系教学计划", yuanxijihuaPanel24);
			}
		});
		button_24.setBounds(588, 228, 115, 40);
		add(button_24);

		JButton button_25 = new JButton("\u73AF\u5883\u5B66\u9662");
		button_25.setFont(new Font("微软雅黑", Font.BOLD, 13));
		button_25.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				yuanxijihuaPanel25.setMyTabbedPane(tabbedPane);
			 tabbedPane.addOne("环境学院教学计划", yuanxijihuaPanel25);
			}
		});
		button_25.setBounds(588, 279, 115, 40);
		add(button_25);

		JButton button_26 = new JButton("\u5927\u6C14\u79D1\u5B66\u5B66\u9662");
		button_26.setFont(new Font("微软雅黑", Font.BOLD, 13));
		button_26.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				yuanxijihuaPanel26.setMyTabbedPane(tabbedPane);
				tabbedPane.addOne("大气科学学院教学计划", yuanxijihuaPanel26);
			}
		});
		button_26.setBounds(588, 330, 115, 40);
		add(button_26);

		JButton button_27 = new JButton("\u5321\u4E9A\u660E\u5B66\u9662");
		button_27.setFont(new Font("微软雅黑", Font.BOLD, 13));
		button_27.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				yuanxijihuaPanel27.setMyTabbedPane(tabbedPane);
				tabbedPane.addOne("匡亚明学院教学计划", yuanxijihuaPanel27);
			}
		});
		button_27.setBounds(588, 381, 115, 40);
		add(button_27);

	}

	public void setMyTabbedPane(MyTabbedPane tabbedPane) {
		this.tabbedPane = tabbedPane;
	}

	public void paintComponent(Graphics g) {
		g.drawImage(INFO, 0, 0, null);
	}

}
